<%@ page language="java" import="java.util.*" import="com.gxuwz.medical.domain.role.*" import="com.gxuwz.medical.vo.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="/medical/css/pintuer.css">
<link rel="stylesheet" href="/medical/css/admin.css">
<script src="/medical/js/jquery-1.4.4.min.js"></script>
<script src="/medical/js/pintuer.js"></script>
<script src="/medical/js/my.js"></script>
<script>
$(function(){
	var pageright = new Array();
	pageright[0]='F010101';
	pageright[1]='F010102';
	pageright[2]='F010103';
	pageright[3]='F010104';
	autoShow(pageright);
});
//单个删除

function del(roleid){
	if(confirm("您确定要删除吗?")){
		window.location.href="del.role?roleid="+roleid;
	}
}
</script>
</head>
<body>
<form method="post" action="" id="listform">
  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 内容列表</strong> <a href="" style="float:right; display:none;">添加字段</a></div>
    <div class="padding border-bottom">
      <ul class="search" style="padding-left:10px;">
        <li> <a name="F010101" class="button border-main icon-plus-square-o" href="page/role/add.jsp"> 添加角色</a> </li>
        
      </ul>
    </div>
  
    <table class="table table-hover text-center" name="F010104">
      <tr>
      <th width="100" style="text-align:left; padding-left:20px;">序号</th>
        <th>角色编码</th>
        <th>名称</th>
        
        
        
        <th width="310">操作</th>
        
      </tr>
      <volist name="list" id="vo">
        
	
    	<%
    		PageBean pageBean = new PageBean();
    		pageBean = (PageBean)request.getAttribute("pageBean");
    		List list = new ArrayList();
    		list = pageBean.getPageData();
    		if(!list.isEmpty()){
    			for(int i=0;i<list.size();i++){
    			Role r = new Role();
    			r = (Role)list.get(i);
    				%>
  		<tr>
  		<td style="text-align:left; padding-left:20px;"><input type="checkbox" name="id[]" value="" />
  		<%=i+1 %></td>
          <td><%=r.getRoleid() %></td>
          <td><%=r.getRoleName() %></td>
          <td><div class="button-group"> <a name="F010103" class="button border-main" href="page/role/edit.jsp?roleid=<%=r.getRoleid()%>"><span class="icon-edit"></span> 修改</a> <a name="F010102" class="button border-red" href="javascript:void(0)" onclick="return del('<%=r.getRoleid()%>')"><span class="icon-trash-o"></span> 删除</a> </div></td>
        </tr>  				
    				<%
    			}
    		}
    	 %>    
      
      <tr>
        <td colspan="8">
        <div class="pagelist">
        <span>当前页：<%=pageBean.getCurrentpage() %>,共<%=pageBean.getTotalPage() %>页</span>
        <%if(!pageBean.isFirst()) {%>
        <a href="list.role?page=1">首页</a> 
        <%} %>
        <%if(pageBean.isHasPrev()){ %>
         <a href="list.role?page=<%=pageBean.getCurrentpage()-1%>">上一页</a> 
        <%}%>
          <%if(pageBean.isHasNext()){ %>
          <a href="list.role?page=<%=pageBean.getCurrentpage()+1%>">下一页</a>
         <%}%>
        <%if(!pageBean.isLast()) {%>
         <a href="list.role?page=<%=pageBean.getTotalPage()%>">尾页</a> 
         <%} %>
         </div>
        </td>
      </tr>
    </table>
  </div>
</form>
</body>
</html>